open(FH,"</Users/yaping/Documents/workspace/data/imprinting_gene/imprinted_gene_hg18_(www.geneimprint.com).txt");
my @in=<FH>;
close(FH);
my @myin=split "\r",$in[0];
	print "$in[0]\n";
my @out;
foreach my $line(@myin){
	my @splitin=split "\t",$line;
	my $chr;
	my $start;
	my $end;

	if($splitin[2] =~ /(\d+)\:(\d+)\-(\d+) /){
		$chr = "chr".$1;
		$start = $2;
		$end = $3;
	}
	else{
		next;
	}
	push(@out,"$chr\t$start\t$end\t$splitin[0]\n");
}
open(OUT,">/Users/yaping/Documents/workspace/data/imprinting_gene/imprinted_gene_hg18_auto.bed");
print OUT @out;
close(OUT);